﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="TfsBuild.NuGetter.Activities.PerformPrePackage"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:local="clr-namespace:TfsBuild.NuGetter.Activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="BinariesDirectory" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="DropLocation" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="BasePath" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="SourcesDirectory" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="PowerShellScriptPath" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="BuildDirectory" Type="InArgument(x:String)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="Workspace" Type="InArgument(mtvc:Workspace)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="DoPrePackaging" Type="InArgument(x:Boolean)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
  </x:Members>
  <mva:VisualBasic.Settings>
    <x:Null />
  </mva:VisualBasic.Settings>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System.Activities</x:String>
      <x:String>System.Activities.XamlIntegration</x:String>
      <x:String>System.Activities.Statements</x:String>
      <x:String>System.Activities.Expressions</x:String>
      <x:String>System.Activities.Validation</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Client</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow.Activities</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow.Tracking</x:String>
      <x:String>Microsoft.TeamFoundation.VersionControl.Client</x:String>
      <x:String>Microsoft.VisualBasic</x:String>
      <x:String>Microsoft.VisualBasic.Activities</x:String>
      <x:String>System</x:String>
      <x:String>System.Activities.Debugger</x:String>
      <x:String>System.ComponentModel</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Drawing</x:String>
      <x:String>System.IO</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Reflection</x:String>
      <x:String>System.Text</x:String>
      <x:String>System.Text.RegularExpressions</x:String>
      <x:String>System.Xml</x:String>
      <x:String>TfsBuild.Versioning.Activities</x:String>
      <x:String>System.Windows.Markup</x:String>
      <x:String>TfsBuild.NuGetter.Activities</x:String>
      <x:String>TfsBuild</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.Workflow</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.TestImpact.BuildIntegration</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.VersionControl.Client</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
      <AssemblyReference>Microsoft.VisualStudio.Platform.VSEditor</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>TfsBuild.Versioning.Activities</AssemblyReference>
      <AssemblyReference>PresentationFramework</AssemblyReference>
      <AssemblyReference>WindowsBase</AssemblyReference>
      <AssemblyReference>PresentationCore</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>TfsBuild.NuGetter.Activities</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Sequence DisplayName="PrePackage files for NuGet Processing">
    <Sequence.Variables>
      <Variable x:TypeArguments="x:String" Name="NuGetterVPrePackageScriptPath" />
      <Variable x:TypeArguments="x:String" Name="NuGetterVExecutePrePackageResult" />
      <Variable x:TypeArguments="x:String" Name="NuGetterVNuGetExeConvertedFilePath" />
      <Variable x:TypeArguments="x:Boolean" Name="NuGetterVPackagingResult" />
      <Variable x:TypeArguments="x:String" Name="NuGetterVPackageFilePath" />
    </Sequence.Variables>
    <If Condition="[DoPrePackaging]" DisplayName="Should we attempt to do PrePackage Step">
      <If.Then>
        <Sequence>
          <If Condition="[PowerShellScriptPath.StartsWith(&quot;$/&quot;)]" DisplayName="If PS script is in source control - go get it - else use NuGetterPowerShellScriptPath">
            <If.Then>
              <Sequence DisplayName="Get the PowerShell Script from Source Control">
                <local:GetFile BuildDirectory="[BuildDirectory]" DestinationSubfolderName="NuGetPackageSupport" FileToGet="[PowerShellScriptPath]" FullPathToFile="[NuGetterVPrePackageScriptPath]" Workspace="[Workspace]" sap2010:WorkflowViewState.IdRef="GetFile_1" />
                <mtbwa:WriteBuildMessage Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;NuGetterVPrePackageScriptPath: {0}&quot;, NuGetterVPrePackageScriptPath)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" sap2010:WorkflowViewState.IdRef="WriteBuildMessage_1" />
                <sap2010:WorkflowViewState.IdRef>Sequence_1</sap2010:WorkflowViewState.IdRef>
              </Sequence>
            </If.Then>
            <If.Else>
              <Assign x:TypeArguments="x:String" DisplayName="Set NuGetterVPrePackageScriptPath" mtbwt:BuildTrackingParticipant.Importance="Low" To="[NuGetterVPrePackageScriptPath]" Value="[Path.Combine(SourcesDirectory, PowerShellScriptPath)]" sap2010:WorkflowViewState.IdRef="Assign`1_1" />
            </If.Else>
            <sap2010:WorkflowViewState.IdRef>If_1</sap2010:WorkflowViewState.IdRef>
          </If>
          <local:InvokeNugetterPowerShellScript BinariesFolder="[BinariesDirectory]" DropFolder="[DropLocation]" NuGetPrePackageFolder="[BasePath]" PowerShellScriptFilepath="[NuGetterVPrePackageScriptPath]" Result="[NuGetterVExecutePrePackageResult]" SourcesFolder="[SourcesDirectory]" sap2010:WorkflowViewState.IdRef="InvokeNugetterPowerShellScript_1" />
          <sap2010:WorkflowViewState.IdRef>Sequence_2</sap2010:WorkflowViewState.IdRef>
        </Sequence>
      </If.Then>
      <sap2010:WorkflowViewState.IdRef>If_2</sap2010:WorkflowViewState.IdRef>
    </If>
    <sap2010:WorkflowViewState.IdRef>Sequence_3</sap2010:WorkflowViewState.IdRef>
    <sads:DebugSymbol.Symbol>d3JDOlxfVGZzUHJvamVjdHNWUzIwMTJcQnVpbGRBY3Rpdml0aWVzXE51R2V0dGVyXERldlxWMi4wXFNvdXJjZVxUZnNCdWlsZC5OdUdldHRlci5BY3Rpdml0aWVzXFBlcmZvcm1QcmVQYWNrYWdlLnhhbWwamAEDuAEOAgEBoAEFtQEKAgECoAEToAElAgEDogEJsgEUAgEFowELrwEQAgETsAELsAHkAgIBBqMBGaMBTAIBFKUBD6kBGgIBGqwBD6wBpQICARawAWGwAXECARGwAYoCsAGeAgIBD7ABQLABVQIBDbABiAGwAZQBAgELsAHXAbAB+wECAQmwAa4BsAHPAQIBB6YBEaYBiwICAR+nARGnAYADAgEbrAG9AawB9QECARmsAZUBrAG2AQIBF6YBe6YBkwECASemAS+mAUECASWmAaMBpgHEAQIBI6YBzwGmAdwBAgEhpgFbpgFwAgEgpwGDAacB4wECAR2nATWnAXoCARw=</sads:DebugSymbol.Symbol>
  </Sequence>
  <sap2010:WorkflowViewState.IdRef>TfsBuild.NuGetter.Activities.PerformPrePackage_1</sap2010:WorkflowViewState.IdRef>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="GetFile_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="WriteBuildMessage_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="222,208">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign`1_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,356" />
      <sap2010:ViewStateData Id="InvokeNugetterPowerShellScript_1" sap:VirtualizedContainerService.HintSize="464,22" />
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="486,542">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_2" sap:VirtualizedContainerService.HintSize="611,690">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="633,814">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TfsBuild.NuGetter.Activities.PerformPrePackage_1" sap:VirtualizedContainerService.HintSize="673,894" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>